From: Alex Williamson Date: Mon, 17 Sep 2007 19:38:25 +0000 (-0600) Subject: [IA64] Make use of PAGE_MASK and PAGE_ALIGN() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14961 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=5fac0e96830ba012cd7f88d8214722d867683e6c;p=xen.git [IA64] Make use of PAGE_MASK and PAGE_ALIGN() As suggested by Isaku Yamahata Signed-off-by: Alex Williamson --- diff --git a/xen/arch/ia64/xen/mm.c b/xen/arch/ia64/xen/mm.c index 041090c446..6399b5a2fd 100644 --- a/xen/arch/ia64/xen/mm.c +++ b/xen/arch/ia64/xen/mm.c @@ -524,7 +524,7 @@ u64 translate_domain_pte(u64 pteval, u64 address, u64 itir__, u64* itir, pteval2 = lookup_domain_mpa(d, mpaddr, entry); if (_itir.ps < PAGE_SHIFT) - pteval2 |= mpaddr & (PAGE_SIZE - 1) & ~((1L << _itir.ps) - 1); + pteval2 |= mpaddr & ~PAGE_MASK & ~((1L << _itir.ps) - 1); /* Check access rights. */ arflags = pteval & _PAGE_AR_MASK; diff --git a/xen/arch/ia64/xen/vhpt.c b/xen/arch/ia64/xen/vhpt.c index 615f81b9ab..0ca2d6e488 100644 --- a/xen/arch/ia64/xen/vhpt.c +++ b/xen/arch/ia64/xen/vhpt.c @@ -293,10 +293,10 @@ __flush_vhpt_range(unsigned long vhpt_maddr, u64 vadr, u64 addr_range) { void *vhpt_base = __va(vhpt_maddr); u64 pgsz = 1L << current->arch.vhpt_pg_shift; - u64 purge_addr = vadr & ~(PAGE_SIZE - 1); + u64 purge_addr = vadr & PAGE_MASK; addr_range += vadr - purge_addr; - addr_range = (addr_range + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); + addr_range = PAGE_ALIGN(addr_range); while ((long)addr_range > 0) { /* Get the VHPT entry. */ unsigned int off = ia64_thash(purge_addr) -